package com.fangzhi;

public class EmployeeCommissionCalculator {


    public static Double t0 = 0.5;
    public static Double t1 = 0.05;
    public static Double t2 = 0.07;
    public static Double t3 = 0.1;
    public static Double t4 = 0.5;

    public static Double t5 = 0.15;

    public static void main(String[] args) {
        Integer total = 42750;
        Integer premium = 0;
        Double ticheng = 0D;
        double yijiaticheng = premium * t0;
        if (total > 150000){
            ticheng += 30000 * t1;
            ticheng += 30000 * t2;
            ticheng += 50000 * t3;
            ticheng += 30000 * t4;
            ticheng += (total - 150000) * t5;
            ticheng += yijiaticheng;
        } else if (total > 130000){
            ticheng += 30000 * t1;
            ticheng += 30000 * t2;
            ticheng += 50000 * t3;
            ticheng += (total - 130000) * t4;
            ticheng += yijiaticheng;
        }else if (total > 80000){
            ticheng += 30000 * t1;
            ticheng += 30000 * t2;
            ticheng += (total - 80000) * t3;
            ticheng += yijiaticheng;
        }else if (total > 50000){
            ticheng += 30000 * t1;
            ticheng += (total - 50000) * t2;
            ticheng += yijiaticheng;
        }else if (total > 20000){
            ticheng += (total - 20000) * t1;
            if ((total - premium) > 20000){
                ticheng += yijiaticheng;
            }else {
                ticheng += (total - 20000) * t0;
            }
        }
        ticheng = ticheng * 100;
        System.out.println(ticheng);
    }
}